package demo12;

public class Solution {

}

class Main {
    public static void main(String[] args) throws InterruptedException {

//        Thread thread = new Thread(new Runnable() {
//            @Override
//            public void run() {
//                for(int i = 0; i < 5; i++) {
//                    System.out.println("当前线程是否收到中断的通知:" + Thread.currentThread().isInterrupted());
//                }
//            }
//        });
//        thread.start();
//        thread.interrupt();

        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i = 0; i < 5; i++) {
                    System.out.println("正在运行 t1 线程");
                }
            }
        });
        t1.start();
        for(int i = 0; i < 5; i++) {
            System.out.println("正在运行 main 线程");
        }

    }
}
